import os
import datetime

# get today and try to return as string
today = datetime.datetime.now()

print "Current year: %d" % today.year
print "Current year: %d" % today.month
print "Current year: %d" % today.day

month_str = str(today.month)
day_str = str(today.day)

# months manipulation
if len(month_str) == 1:
    month_str = "0" + month_str
else:
    month_str = month_str
  
# day manipulation
if len(day_str) == 1:
    day_str = "0" + day_str
else:
    day_str = day_str  

today_str = str(today.year) + month_str + day_str
tm_str = str(today.year) + month_str

print today_str

try:
	vFileName = "d:\\backup\\db\\"+today_str+".bzs"
	#vFileName = "d:\\backup\\db\\test.bzs"
	vCommand = "c:\\bbzip\\breadzip.exe " + vFileName
	os.system(vCommand) 
	f = open(vFileName,'r')	

except IOError:
	print("File Not Found exception")
	print("File Name " + vFileName)

except:
	print("today_str " + today_str)


